import request from '../utils/request'
const api_name = '/order'
export default {
    //获取课程购买状态courseId
    isBought(courseId) {
        return request({
            url: `${api_name}/isbought/${courseId}`,
            method: 'get',
        })
    },
    //获取指定课程订单信息
    showInfo(courseId) {
        return request({
            url: `${api_name}/info/${courseId}`,
            method: 'get',
        })
    },
    //根据课程编号创建课程名单
    createOrder(courseId) {
        return request({
            url: `${api_name}/${courseId}`,
            method: 'post',
        })
    },
    //获取用户的所有订单
    getOrder() {
        return request({
            url: `${api_name}/list`,
            method: 'get',
        })
    },
}